home *** CD-ROM | disk | FTP | other *** search
- Path: oitnews.harvard.edu!NewsWatcher!user
- From: duffyfr@a1.tch.harvard.edu (Frank H. Duffy, MD)
- Newsgroups: comp.lang.c
- Subject: Unfamiliar DOS functions, help please
- Date: Mon, 05 Feb 1996 21:00:04 -0500
- Organization: Harvard Medical School
- Message-ID: <duffyfr-0502962100040001@134.174.41.144>
- NNTP-Posting-Host: 134.174.41.144
-
- Am attempting to port software coded in Microsoft C for DOS
- over to Unix (Linux using gcc). Don't have access to needed
- manuals.
-
- The following code interrupts a data loop with ESC key:
-
- if(kbhit()) {
- if((Key = getch()) == 0)
- Key = getch() + 0x100;
- if(Key == 27)
- return;
- }
-
- Is there a simple way to emulate kbhit in gcc in unix environment?
- Is there a simple way to unblock read of stdin in unix?
-
- Thanks for your help. Please respond via e-mail (address below).
-
- Frank
- ----------------------------------------------------------------
- Frank H. Duffy, MD e-mail: duffyfr@a1.tch.harvard.edu
- Neurlogy phone: (617)-355-7919
- Childrens Hospital & fax: (617)-355-7230
- Harvard Medical School ham radio: k1moq
- 300 Longwood Ave
- Boston, MA 02115 USA
-